{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "import os\n",
    "from os.path import dirname, realpath, join\n",
    "base_dir = dirname(dirname(os.getcwd()))\n",
    "base_dir\n",
    "import pandas as pd\n",
    "from os.path import join\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "sys.path.insert(0, base_dir)\n",
    "from config_path import PROSTATE_DATA_PATH, PLOTS_PATH, PROSTATE_LOG_PATH"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#https://stackoverflow.com/questions/56518924/how-we-can-get-the-total-number-of-neurons-from-a-model-in-keras-is-there-any-f\n",
    "def get_total_number_of_neurons(model, include_output_layer):\n",
    "    '''\n",
    "    Args:\n",
    "        model: Keras model\n",
    "        include_output_layer: A boolean parameter. Whether or not to include output layer's neurons into the calculation\n",
    "\n",
    "    Returns: number of neurons in the given model\n",
    "    '''\n",
    "    num_layers = len(model.layers)\n",
    "    total_num_of_neurons = 0\n",
    "    for layer_index in range(num_layers):\n",
    "        layer = model.layers[layer_index]\n",
    "        # since we multiply layer output dimensions, initial value is set to 1.\n",
    "        num_neurons_in_layer = 1\n",
    "        for i in range(1, len(layer.output.shape)):\n",
    "            try:\n",
    "                # when it is a valid layer to count neurons, an output dimension of the layer can be convertible to int.\n",
    "                num_neurons_in_layer *= int(layer.output.shape[i])\n",
    "            except Exception:\n",
    "                # if the output dimension of layer cannot be convertible to int,\n",
    "                # just pass that layer since it is not a valid layer to count neurons\n",
    "                pass\n",
    "        # if num_neurons_in_layer is not still 1, it means we have a valid layer to count neurons\n",
    "        if not num_neurons_in_layer == 1:\n",
    "            # when it is an output layer\n",
    "            if layer_index == (num_layers - 1):\n",
    "                if include_output_layer:\n",
    "                    total_num_of_neurons += num_neurons_in_layer\n",
    "            else:  # when it is not an output layer\n",
    "                total_num_of_neurons += num_neurons_in_layer\n",
    "    return total_num_of_neurons"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "filename = join(PROSTATE_LOG_PATH, 'pnet/onsplit_average_reg_10_tanh_large_testing/P-net_ALL_params.yml')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "from utils.loading_utils import DataModelLoader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    }
   ],
   "source": [
    "loader = DataModelLoader(filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/utils/loading_utils.py:45: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.\n",
      "  params = yaml.load(stream)\n",
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'params': {'balanced_data': False, 'data_type': ['mut_important', 'cnv_del', 'cnv_amp'], 'mut_binary': True, 'cnv_levels': 3, 'selected_genes': 'tcga_prostate_expressed_genes_and_cancer_genes.csv', 'use_coding_genes_only': True, 'drop_AR': False, 'combine_type': 'union', 'training_split': 0}, 'type': 'prostate_paper', 'id': 'ALL'}\n",
      "n_hidden_layers 5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1011, 27687)\n",
      "(1011, 1)\n",
      "(1011,)\n",
      "(27687,)\n",
      "input dimension 27687 self.units 9229\n",
      "n_inputs_per_node 3\n",
      "self.kernel_initializer <keras.regularizers.L1L2 object at 0x1058da390> <keras.initializers.VarianceScaling object at 0x1a34c7bd10> <keras.regularizers.L1L2 object at 0x1058da390>\n",
      "input dimensions (None, 27687)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:145: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear0\")`\n",
      "  decision_outcome = Dense(1, activation='linear', name='o_linear{}'.format(0), W_regularizer=reg_l(w_reg_outcome0))(\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:162: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear1\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome1 / 2.))(outcome)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "layer # 0\n",
      "pathways 1387\n",
      "genes 9275\n",
      "filtered_map (9229, 0)\n",
      "filtered_map (9229, 0)\n",
      "filtered_map (9229, 0)\n",
      "layer # 1\n",
      "pathways 1066\n",
      "genes 1399\n",
      "filtered_map (1387, 0)\n",
      "filtered_map (1387, 0)\n",
      "filtered_map (1387, 0)\n",
      "layer # 2\n",
      "pathways 447\n",
      "genes 1068\n",
      "filtered_map (1066, 0)\n",
      "filtered_map (1066, 0)\n",
      "filtered_map (1066, 0)\n",
      "layer # 3\n",
      "pathways 147\n",
      "genes 448\n",
      "filtered_map (447, 0)\n",
      "filtered_map (447, 0)\n",
      "filtered_map (447, 0)\n",
      "layer # 4\n",
      "pathways 26\n",
      "genes 147\n",
      "filtered_map (147, 0)\n",
      "filtered_map (147, 0)\n",
      "filtered_map (147, 0)\n",
      "layer # 5\n",
      "pathways 1\n",
      "genes 26\n",
      "filtered_map (26, 0)\n",
      "filtered_map (26, 0)\n",
      "filtered_map (26, 0)\n",
      "original dropout [0.5, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]\n",
      "dropout [1, 2, 3, 4, 5] [0.5, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] [0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001]\n",
      "layer 0, dropout  0.1 w_reg 0.001\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:228: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear2\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome))(outcome)\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:228: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear3\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome))(outcome)\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:228: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear4\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome))(outcome)\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:228: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear5\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome))(outcome)\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/builders_utils.py:228: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(1, activation=\"linear\", kernel_regularizer=<keras.reg..., name=\"o_linear6\")`\n",
      "  W_regularizer=reg_l(w_reg_outcome))(outcome)\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/prostate_models.py:172: UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=[<tf.Tenso..., inputs=[<tf.Tenso...)`\n",
      "  model = Model(input=[ins], output=outcome)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "layer 1, dropout  0.1 w_reg 0.001\n",
      "layer 2, dropout  0.1 w_reg 0.001\n",
      "layer 3, dropout  0.1 w_reg 0.001\n",
      "layer 4, dropout  0.1 w_reg 0.001\n",
      "Compiling...\n",
      "loss_weights [2, 7, 20, 54, 148, 400]\n",
      "[<keras.engine.input_layer.InputLayer object at 0x1a35045a10>, <model.layers_custom.Diagonal object at 0x1a34c7bfd0>, <keras.layers.core.Dropout object at 0x1a3a12e5d0>, <model.layers_custom.SparseTF object at 0x1a39f33fd0>, <keras.layers.core.Dropout object at 0x1a39b94810>, <model.layers_custom.SparseTF object at 0x1a3a8bd3d0>, <keras.layers.core.Dropout object at 0x1a39f3be10>, <model.layers_custom.SparseTF object at 0x1a39f44210>, <keras.layers.core.Dropout object at 0x1a36524e90>, <model.layers_custom.SparseTF object at 0x1a36524c50>, <keras.layers.core.Dropout object at 0x1a382dfcd0>, <model.layers_custom.SparseTF object at 0x1a382dfa90>, <keras.layers.core.Dense object at 0x1a375e6090>, <keras.layers.core.Dense object at 0x1a39f33210>, <keras.layers.core.Dense object at 0x1a37e9dd90>, <keras.layers.core.Dense object at 0x1a364eef10>, <keras.layers.core.Dense object at 0x1a35f29e90>, <keras.layers.core.Dense object at 0x1a38580ad0>, <keras.layers.core.Activation object at 0x1a3a12eb90>, <keras.layers.core.Activation object at 0x1a3a8d17d0>, <keras.layers.core.Activation object at 0x1a39f3b790>, <keras.layers.core.Activation object at 0x1a36524610>, <keras.layers.core.Activation object at 0x1a382df450>, <keras.layers.core.Activation object at 0x1a38e04f10>]\n",
      "__________________________________________________________________________________________________\n",
      "Layer (type)                    Output Shape         Param #     Connected to                     \n",
      "==================================================================================================\n",
      "inputs (InputLayer)             (None, 27687)        0                                            \n",
      "__________________________________________________________________________________________________\n",
      "h0 (Diagonal)                   (None, 9229)         36916       inputs[0][0]                     \n",
      "__________________________________________________________________________________________________\n",
      "dropout_0 (Dropout)             (None, 9229)         0           h0[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h1 (SparseTF)                   (None, 1387)         17038       dropout_0[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_1 (Dropout)             (None, 1387)         0           h1[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h2 (SparseTF)                   (None, 1066)         2462        dropout_1[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_2 (Dropout)             (None, 1066)         0           h2[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h3 (SparseTF)                   (None, 447)          1517        dropout_2[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_3 (Dropout)             (None, 447)          0           h3[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h4 (SparseTF)                   (None, 147)          594         dropout_3[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_4 (Dropout)             (None, 147)          0           h4[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h5 (SparseTF)                   (None, 26)           174         dropout_4[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o_linear1 (Dense)               (None, 1)            9230        h0[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear2 (Dense)               (None, 1)            1388        h1[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear3 (Dense)               (None, 1)            1067        h2[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear4 (Dense)               (None, 1)            448         h3[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear5 (Dense)               (None, 1)            148         h4[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear6 (Dense)               (None, 1)            27          h5[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o1 (Activation)                 (None, 1)            0           o_linear1[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o2 (Activation)                 (None, 1)            0           o_linear2[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o3 (Activation)                 (None, 1)            0           o_linear3[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o4 (Activation)                 (None, 1)            0           o_linear4[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o5 (Activation)                 (None, 1)            0           o_linear5[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o6 (Activation)                 (None, 1)            0           o_linear6[0][0]                  \n",
      "==================================================================================================\n",
      "Total params: 71,009\n",
      "Trainable params: 71,009\n",
      "Non-trainable params: 0\n",
      "__________________________________________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "model = loader.get_model('P-net_ALL')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "__________________________________________________________________________________________________\n",
      "Layer (type)                    Output Shape         Param #     Connected to                     \n",
      "==================================================================================================\n",
      "inputs (InputLayer)             (None, 27687)        0                                            \n",
      "__________________________________________________________________________________________________\n",
      "h0 (Diagonal)                   (None, 9229)         36916       inputs[0][0]                     \n",
      "__________________________________________________________________________________________________\n",
      "dropout_0 (Dropout)             (None, 9229)         0           h0[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h1 (SparseTF)                   (None, 1387)         17038       dropout_0[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_1 (Dropout)             (None, 1387)         0           h1[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h2 (SparseTF)                   (None, 1066)         2462        dropout_1[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_2 (Dropout)             (None, 1066)         0           h2[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h3 (SparseTF)                   (None, 447)          1517        dropout_2[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_3 (Dropout)             (None, 447)          0           h3[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h4 (SparseTF)                   (None, 147)          594         dropout_3[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "dropout_4 (Dropout)             (None, 147)          0           h4[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "h5 (SparseTF)                   (None, 26)           174         dropout_4[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o_linear1 (Dense)               (None, 1)            9230        h0[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear2 (Dense)               (None, 1)            1388        h1[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear3 (Dense)               (None, 1)            1067        h2[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear4 (Dense)               (None, 1)            448         h3[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear5 (Dense)               (None, 1)            148         h4[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o_linear6 (Dense)               (None, 1)            27          h5[0][0]                         \n",
      "__________________________________________________________________________________________________\n",
      "o1 (Activation)                 (None, 1)            0           o_linear1[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o2 (Activation)                 (None, 1)            0           o_linear2[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o3 (Activation)                 (None, 1)            0           o_linear3[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o4 (Activation)                 (None, 1)            0           o_linear4[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o5 (Activation)                 (None, 1)            0           o_linear5[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "o6 (Activation)                 (None, 1)            0           o_linear6[0][0]                  \n",
      "==================================================================================================\n",
      "Total params: 71,009\n",
      "Trainable params: 71,009\n",
      "Non-trainable params: 0\n",
      "__________________________________________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "model.model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "52265"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_total_number_of_neurons(model.model, True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Dense model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    }
   ],
   "source": [
    "filename = join(PROSTATE_LOG_PATH, 'dense/onesplit_number_samples_dense_sameweights/dense_data_0_params.yml')\n",
    "loader = DataModelLoader(filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'params': {'balanced_data': False, 'data_type': ['mut_important', 'cnv_del', 'cnv_amp'], 'mut_binary': True, 'cnv_levels': 3, 'selected_genes': 'tcga_prostate_expressed_genes_and_cancer_genes.csv', 'use_coding_genes_only': True, 'drop_AR': False, 'combine_type': 'union', 'training_split': 0}, 'type': 'prostate_paper', 'id': 'ALL'}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:root:some genes dont exist in the original data set\n",
      "WARNING:root:some genes dont exist in the original data set\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1011, 27687)\n",
      "(1011, 1)\n",
      "(1011,)\n",
      "(27687,)\n",
      "3.0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/prostate_models.py:356: UserWarning: Update your `Dense` call to the Keras 2 API: `Dense(units=3, activation=\"selu\", kernel_regularizer=<keras.reg..., name=\"h0\")`\n",
      "  layer1 = Dense(units=int(n), activation=activation, W_regularizer=l2(w_reg), name='h0')\n",
      "/Users/haithamelmarakeby/PycharmProjects/pnet2/model/builders/prostate_models.py:359: UserWarning: Update your `Model` call to the Keras 2 API: `Model(outputs=Tensor(\"ou..., inputs=[<tf.Tenso...)`\n",
      "  model = Model(input=[ins], output=outcome)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[<keras.engine.input_layer.InputLayer object at 0x115b28310>, <keras.layers.core.Dense object at 0x1a3a12eb10>, <keras.layers.core.Dense object at 0x1a399c4210>]\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "inputs (InputLayer)          (None, 27687)             0         \n",
      "_________________________________________________________________\n",
      "h0 (Dense)                   (None, 3)                 83064     \n",
      "_________________________________________________________________\n",
      "output (Dense)               (None, 1)                 4         \n",
      "=================================================================\n",
      "Total params: 83,068\n",
      "Trainable params: 83,068\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "dense_model =  loader.get_model('dense_data_0')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "27690"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_total_number_of_neurons(dense_model.model, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5298000573997895"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "27690./52265"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:min_env]",
   "language": "python",
   "name": "conda-env-min_env-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
